package com.dongchedi.utils;

import org.apache.commons.lang3.StringUtils;
import org.springframework.util.DigestUtils;
/**
 * @author leibidong
 * @description Md5加密工具
 * @date 2021/6/25
 */
public class Md5 {
    public static String md5(String key) {
        //String newKey="as"+key+"qw";   增加密码key的复杂程度
        if (StringUtils.isBlank(key)) {
            return null;
        }
        return DigestUtils.md5DigestAsHex(key.getBytes());
    }
}
